<?php

use yii\helpers\Html;
use yii\grid\GridView;
use common\models\SysUserLogs;

/* @var $this yii\web\View */
/* @var $searchModel common\models\searchs\SearchSysUsersLogs */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '用户日志';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="sys-user-logs-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

   

    <?= common\components\grid\GridView2015::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'enableButton' => false,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'id',
            'uid',
             [
                'class' => 'common\components\grid\DataColumn2015',
                'label'=>'用户名',
                
                'value' => function($searchModel) {
                    return SysUserLogs::GetUserName($searchModel->uid);
                },
            ],
            'operation',
            'remark',
            'ip',
            'create_time:datetime',

            [
            'class' => 'common\components\grid\ActionColumn2015',
            'template' => '{view}',
               
            ],
        ],
    ]); ?>

</div>
